package com.group3.merchant.service.impl;

import java.util.List;

import com.group3.entity.Dish;
import com.group3.merchant.dao.IDishDao;
import com.group3.merchant.dao.impl.DishDaoImpl;
import com.group3.merchant.service.IDishService;

public class DishServiceImpl implements IDishService{

	private IDishDao dao = new DishDaoImpl();
	
	public List<Dish> showAllDish() {
		return dao.queryAllDish();
	}

	public List<Dish> showByMId(String mid) {
		return dao.queryByMId(mid);
	}

	public Dish addDish(Dish dish) {
		return dao.insertDish(dish);
	}

	public Dish motifyDish(Dish dish) {
		return dao.updateDish(dish);
	}

	public int delDish(Dish dish) {
		return dao.deleteDish(dish);
	}
	
	public Dish showByDid(String did) {
		return dao.queryBydId(did);
	}

	@Override
	public List<Dish> showByMTid(String mid, String tid) {
		return dao.queryBy(mid, tid);
	}

}
